package tc.jv.task8;

import tc.jv.task8.observer.*;

public class Main
{

	public static void main(String[] args)
	{

		Observer obs = new Observer()
		{
			
			@Override
			public void vectorUpdateEvent()
			{
				System.out.println("Vector has updated");
			}
			
			@Override
			public void elementUpdateEvent(int index)
			{
				System.out.printf("Element with index %d has updated\n", index);
			}
		};
		
		ObservableVector o = new ObservableVector();
		o.addObserver(obs);
		o.add(1.0);
		o.removeObserver(obs);
		o.add(2.0);		
	}

}
